<template>
  <div class="app-main-container">
    <QueryForm
      v-model="querys"
      :query-form-config="queryFormConfig"
      @handleQuery="getList(1)"
      @clear="clearQueryForm"
    >
      <template #btns>
        <el-button
          v-if="meta.indexOf('MealsUseDetailExport') > -1"
          type="primary"
          @click="comboRecordExport"
          >{{ $t("message.daochu") }}</el-button
        >
      </template>
      <template #indate>
        <el-date-picker
          v-model="querys.indate"
          type="datetimerange"
          :range-separator="$t('message.zhi')"
          :start-placeholder="$t('message.ksrq')"
          :end-placeholder="$t('message.jsrq')"
          format="yyyy-MM-dd HH:mm:ss"
          value-format="yyyy-MM-dd HH:mm:ss"
          class="w400"
          @change="getList(1)"
          :picker-options="pickerOptions"
        />
      </template>
    </QueryForm>
    <div class="doumee_table_header">
      <!-- <el-button
        v-preventReClick
        type="primary"
        @click="openModal('dongjie')"
      >{{ $t('message.dj') }}</el-button> -->
      <el-button
        v-preventReClick
        type="primary"
        @click="openModal('jiedong')"
        >{{ $t("message.jd") }}</el-button
      >
      <el-button v-preventReClick @click="openModal('tiaozheng')">{{
        $t("message.tctz")
      }}</el-button>
      <el-button v-preventReClick type="danger" @click="openModal('zuofei')">{{
        $t("message.zuofei")
      }}</el-button>
    </div>
    <el-table
      ref="table"
      v-loading="saleRecordLoading"
      :data="saleRecordList"
      element-loading-text="Loading"
      border
      fit
      :header-row-class-name="'table-header'"
      class="doumee-element-tableb"
      @selection-change="handleSelectionChange"
    >
      <el-table-column
        fixed="left"
        align="center"
        type="selection"
        :selectable="handleDisable"
        width="55"
      />
      <el-table-column
        align="center"
        :label="$t('message.tcph')"
        width="300"
        show-overflow-tooltip
      >
        <template v-slot="scope">
          <span class="primaryColor pointer" @click="comboDetail(scope.row)">{{
            scope.row.id
          }}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" :label="$t('message.tclx')" width="120">
        <template v-slot="scope">
          <span v-if="scope.row.mealsType === '0'">{{
            $t("message.mpck")
          }}</span>
          <span v-if="scope.row.mealsType === '1'">{{
            $t("message.mpqxk")
          }}</span>
          <span v-if="scope.row.mealsType === '2'">{{
            $t("message.ydck")
          }}</span>
          <span v-if="scope.row.mealsType === '3'">{{
            $t("message.kcyyck")
          }}</span>
          <span v-if="scope.row.mealsType === '4'">{{
            $t("message.kcqxk")
          }}</span>
        </template>
      </el-table-column>
      <el-table-column
        align="center"
        :label="$t('message.tcname')"
        show-overflow-tooltip
        width="160"
        prop="mealsName"
      />
      <el-table-column
        align="center"
        :label="$t('message.memberInfo')"
        min-width="240"
        prop="memberInfo"
        show-overflow-tooltip
      />
      <el-table-column
        align="center"
        :label="$t('message.zcs')"
        width="80"
        prop="numCount"
      >
        <template v-slot="scope">
          <span v-if="scope.row.mealsType === '1'">-</span>
          <span v-else>{{ scope.row.numCount }}</span>
        </template>
      </el-table-column>
      <el-table-column
        align="center"
        :label="$t('message.sycs')"
        width="80"
        prop="useCount"
      >
        <template v-slot="scope">
          <span v-if="scope.row.mealsType === '1'">-</span>
          <span v-else>{{ scope.row.useCount }}</span>
        </template>
      </el-table-column>
      <el-table-column
        align="center"
        :label="$t('message.sycs2')"
        width="80"
        prop="remainCount"
      >
        <template v-slot="scope">
          <span v-if="scope.row.mealsType === '1'">-</span>
          <span v-else>{{ scope.row.remainCount }}</span>
        </template>
      </el-table-column>
      <el-table-column
        align="center"
        :label="$t('message.yxrq')"
        width="120"
        prop="validTime"
      />
      <el-table-column
        align="center"
        :label="$t('message.zdjdsj')"
        width="120"
        prop="autoFreezeDate"
      />
      <el-table-column
        fixed="right"
        align="center"
        :label="$t('message.tzzt')"
        width="80"
      >
        <template v-slot="scope">
          <span v-if="scope.row.status === '0'" class="text_success">{{
            $t("message.zc")
          }}</span>
          <span v-if="scope.row.status === '1'" class="text_warning">{{
            $t("message.dj")
          }}</span>
          <span v-if="scope.row.status === '2'" class="text-danger">{{
            $t("message.zuofei")
          }}</span>
          <span v-if="scope.row.status === '3'" class="text-danger">{{
            $t("message.shixiao")
          }}</span>
        </template>
      </el-table-column>
      <el-table-column
        align="center"
        :label="$t('message.caozuo')"
        fixed="right"
        :width="$i18n.locale === 'ZH' ? 150 : 250"
      >
        <template v-slot="scope">
          <template>
            <el-button
              v-if="
                meta.indexOf('MealsMemberPartRefund') > -1 &&
                (scope.row.status == '0' || scope.row.status == '1')
              "
              type="text"
              @click="rowClickRefund(scope.row)"
              >{{ $t("message.tk") }}</el-button
            >
            <el-button
              v-if="scope.row.status == '0'"
              type="text"
              @click="getServiceChargePriceBtn('2', scope.row.id, scope.row)"
              >{{ $t("message.dj") }}</el-button
            >
          </template>
        </template>
      </el-table-column>
    </el-table>
    <Paginations
      :total="saleRecordTotal"
      :page="pagination.page"
      @current-change="getList"
      @SizeChange="pageSizeChange"
    />

    <el-dialog
      :title="ModalTitle"
      :visible.sync="isShowModal"
      :close-on-click-modal="closeModal"
      width="500px"
    >
      <div class="h3">{{ ModalText }}</div>
      <div v-if="ModalTitle === $t('message.tcdj')" style="margin-top: 20px">
        {{ $t("message.djsxf") }}：{{
          serviceChargePrice
            ? serviceChargePrice + $t("message.yuan")
            : $t("message.mianfei")
        }}
      </div>
      <div
        v-if="
          ModalTitle != $t('message.tcjd') && ModalTitle != $t('message.tczf')
        "
        class="df_ac mt20"
      >
        <span class="key">{{ $t("message.jdsj") }}：</span>
        <el-date-picker
          v-model="ModelTime"
          type="date"
          value-format="yyyy-MM-dd"
          :picker-options="pickerOptions"
          :placeholder="$t('message.qxz') + $t('message.jdsj')"
          class="flex1"
        />
      </div>
      <div class="df_ac mt20">
        <span>{{ $t("message.czbz") }}：</span>
        <el-input
          v-model="ModelRemark"
          class="flex1"
          :placeholder="$t('message.qsr') + $t('message.czbz')"
        />
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="isShowModal = false">{{
          $t("message.qx")
        }}</el-button>
        <el-button
          v-preventReClick
          type="primary"
          :loading="subLoading"
          @click="handleModelEnter"
          >{{ $t("message.qr") }}</el-button
        >
      </span>
    </el-dialog>

    <el-dialog
      :title="$t('message.tctz')"
      :visible.sync="isShowAdjust"
      :close-on-click-modal="closeModal"
      width="500px"
    >
      <div class="adjust_modal">
        <el-radio-group v-model="isAllType">
          <div v-if="selectSalesList && selectSalesList.length > 0">
            <el-radio :label="1"
              >{{ $t("message.yxdq") }}{{ selectSalesList.length
              }}{{ $t("message.tsj") }}</el-radio
            >
          </div>
          <div class="mt10">
            <el-radio :label="2"
              >{{ $t("message.yxdqsx") }}{{ saleRecordTotal
              }}{{ $t("message.tsj") }}</el-radio
            >
          </div>
        </el-radio-group>
        <!-- 新增调整 -->
        <div class="df_ac mb5 mt20">
          <span class="key">{{ $t("message.yxqtz") }}：</span>
          <div style="display: flex">
            <el-select
              v-model="adjustData.dayTye"
              class="mr10"
              style="flex: 1; width: 128px"
              @change="handleAdjustType"
            >
              <el-option :label="$t('message.zjgdts')" value="0" />
              <el-option :label="$t('message.tzzzdrq')" value="1" />
            </el-select>
            <el-input
              v-if="adjustData.dayTye === '0'"
              :placeholder="$t('message.qsr')"
              v-model="adjustData.addTime"
              oninput="value=value.replace(/[^\d]/g,'')"
              class="flex1 mr10"
            />
            <!-- <el-date-picker v-model="adjustData.zdDay" type="date" placeholder="选择日期"> -->
            <!-- </el-date-picker> -->
            <el-date-picker
              v-if="adjustData.dayTye === '1'"
              style="width: 178px; flex: 1; margin-right: 10px"
              v-model="adjustData.zdDay"
              type="date"
              value-format="yyyy-MM-dd"
              :picker-options="pickerOptions"
              :placeholder="$t('message.qxz')"
            />
          </div>

          <span v-if="adjustData.dayTye === '0'">{{ $t("message.tian") }}</span>
        </div>
        <div class="df_ac mb20">
          <span class="key" />
          <span class="text_warning">{{ $t("message.xgtcyxqzj") }}</span>
        </div>
        <div class="df_ac mb5">
          <span class="key">{{ $t("message.tcylzj") }}：</span>
          <el-input
            v-model="adjustData.addNum"
            oninput="value=value.replace(/[^\d]/g,'')"
            class="flex1 mr10"
          />
          <span>{{ $t("message.ci") }}</span>
        </div>
        <div class="df_ac">
          <span class="key" />
          <span class="text_warning">{{ $t("message.xgtcylzjyscs") }}</span>
        </div>
        <div class="df_ac mt20">
          <span class="key">{{ $t("message.czbz") }}：</span>
          <el-input
            v-model="ModelRemark"
            style="width: 336px"
            :placeholder="$t('message.qsr') + $t('message.czbz')"
          />
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="isShowAdjust = false">{{
          $t("message.qx")
        }}</el-button>
        <el-button
          v-preventReClick
          type="primary"
          :loading="subLoading"
          @click="handleModelEnter"
          >{{ $t("message.qr") }}</el-button
        >
      </span>
    </el-dialog>

    <Refund
      v-if="isShowRefund"
      ref="RefundRef"
      @close="isShowRefund = false"
      @success="refundSuccess"
    />
    <Detail v-if="isShowDetail" ref="detailRef" />
    <orderDialog ref="child" @orderSuccess="getList()" />
    <RechargeTem v-if="isPrint" ref="RechargeTemRef" />
  </div>
</template>

<script>
import Paginations from "@/components/paginations";
import dayjs from "dayjs";
import { parseTime } from "@/utils";
import orderDialog from "@/components/order";
import {
  comboSalesRecordPost,
  handleComboSalesPost,
  handleComboAllAdjust,
  recordExport,
  getServiceChargePrice,
  printOrder,
} from "@/api";
import QueryForm from "@/components/QueryForm";
import RechargeTem from "@/components/printTem/recharge.vue";
import Detail from "../comboDetail";
import Refund from "./refund.vue";
export default {
  name: "SalesRecord",
  components: {
    Paginations,
    QueryForm,
    RechargeTem,
    orderDialog,
    Refund,
    Detail,
  },
  data() {
    return {
      exportLoading: false,
      isShowDetail: false,
      isShowRefund: false,
      isAllType: 1,
      rowInfo: {},
      isPrint: false,
      queryFormConfig: {
        formItems: [
          {
            filed: "id",
            type: "input",
            label: this.$t("message.tcph"),
            clearable: true,
          },
          {
            filed: "mealsName",
            type: "input",
            label: this.$t("message.tcname"),
            clearable: true,
          },
          {
            filed: "memberSearchValue",
            type: "input",
            label: this.$t("message.memberInfo"),
            placeholder: this.$t("message.hy2"),
            clearable: true,
          },
          {
            filed: "status",
            type: "select",
            label: this.$t("message.status"),
            clearable: true,
            options: [
              { value: "0", label: this.$t("message.zc") },
              { value: "1", label: this.$t("message.dj") },
              { value: "2", label: this.$t("message.zuofei") },
              { value: "3", label: this.$t("message.shixiao") },
            ],
          },
          {
            filed: "indate",
            type: "slot",
            label: this.$t("message.yxq"),
          },
        ],
        online: true,
      },
      pickerOptions: this.handelDate(),
      meta: [],
      closeModal: this.$store.getters.dialog,
      querys: {
        id: "",
        mealsName: "",
        memberSearchValue: "",
        status: "",
        indate: [],
      },
      pagination: {
        firstQueryTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
        page: 1,
        rows: 10,
      },

      saleRecordList: [],
      saleRecordTotal: 0,
      selectSalesList: [],
      saleRecordLoading: false,
      subLoading: false,

      isShowModal: false,
      ModalTitle: "",
      ModalText: "",
      ModelTime: "",
      ModelRemark: "",
      // ⬇️adjust调整相关
      isShowAdjust: false,
      adjustData: {
        addNum: "",
        addTime: "",
        dayTye: "0",
        zdDay: null,
      },
      serviceChargePrice: "",
      serviceChargeId: "",
    };
  },
  created() {
    this.meta = this.$route.meta.buttons || [];
    this.getList(1);
  },
  mounted() {
    this.$nextTick(() => {
      this.$refs.table.doLayout();
    });
  },
  activated() {
    this.$nextTick(() => {
      this.$refs.table.doLayout();
    });
  },
  methods: {
    handleAdjustType() {
      this.adjustData.addTime = "";
      if (this.adjustData.dayTye === "0") {
        this.adjustData.zdDay = null;
      }
    },
    rowClickRefund(row) {
      this.isShowRefund = true;
      this.$nextTick(() => {
        this.$refs.RefundRef.getPrice(row);
        this.$refs.RefundRef.isShow = true;
      });
    },
    handelDate() {
      return {
        // disabledDate : 设置禁用状态，参数为当前日期，要求返回 Boolean
        disabledDate(time) {
          // return time.getTime() > Date.now() // 只能选今天之前的日期
          return time.getTime() < Date.now(); // 只能选今天之后的日期
          // return time.getTime() < Date.now() - 1 * 24 * 3600 * 1000 // 包括当前日期之后的日期
        },
      };
    },
    refundSuccess() {
      this.isShowRefund = false;
      this.getList();
    },
    getServiceChargePriceBtn(type, mealsMemberId, rowInfo) {
      this.serviceChargeId = mealsMemberId;
      this.rowInfo = { ...rowInfo };
      getServiceChargePrice({
        param: {
          type,
          mealsMemberId,
        },
      })
        .then((res) => {
          if (res.errorCode === "000000") {
            this.serviceChargePrice = res.record.price;
            this.openModal("dongjie");
          }
        })
        .catch(() => {});
    },
    comboRecordExport() {
      const { querys } = this;
      this.exportLoading = true;
      recordExport({
        param: {
          ...querys,
        },
      })
        .then((res) => {
          this.exportLoading = false;
          if (res.errorCode === "000000") {
            if (window.Android) {
              Android.downloadFile(res.record.showUrl);
              return;
            }
            const a = document.createElement("a"); // 创建一个a标签元素
            a.style.display = "none"; // 设置元素不可见
            a.href = res.record.showUrl; // 设置下载地址
            document.body.appendChild(a); // 加入
            a.click(); // 触发点击,下载
            document.body.removeChild(a); //
            this.$message.success(this.$t("message.dccg"));
          }
        })
        .catch(() => {
          this.exportLoading = false;
        });
    },
    handleDisable(row, index) {
      if (row.status === "2") {
        return false;
      } else {
        return true;
      }
    },
    // 查询表格数据
    getList(page) {
      const { querys, pagination } = this;
      if (page) {
        pagination.page = page;
        this.pagination.page = Number(page);
      }
      if (querys.indate && querys.indate.length > 0) {
        querys.startTime = querys.indate[0];
        querys.endTime = querys.indate[1];
      } else {
        querys.startTime = null;
        querys.endTime = null;
      }
      pagination.firstQueryTime = parseTime(new Date());
      this.saleRecordLoading = true;
      comboSalesRecordPost({
        pagination,
        param: {
          ...querys,
          venueId: sessionStorage.getItem("venueId"),
        },
      })
        .then((res) => {
          this.saleRecordLoading = false;
          if (res.errorCode === "000000") {
            this.saleRecordLoading = false;
            this.saleRecordTotal = res.totalCount;
            this.saleRecordList = res.recordList;
            if (
              res.totalCount &&
              res.recordList.length === 0 &&
              pagination.page > 1
            ) {
              this.getList(Math.ceil(res.totalCount / pagination.rows));
            }
          }
        })
        .catch(() => {
          this.saleRecordLoading = false;
        });
    },
    clearQueryForm() {
      // eslint-disable-next-line no-unused-vars
      this.querys = {};
      this.getList(1);
    },
    // 打开modal 冻结 解冻 作废
    openModal(type) {
      const { selectSalesList } = this;
      this.ModelRemark = "";
      this.ModelTime = "";
      this.adjustData.addNum = "";
      this.adjustData.addTime = "";
      this.adjustData.zdDay = "";
      switch (type) {
        case "dongjie":
          this.ModalTitle = this.$t("message.tcdj");
          this.ModalText = this.$t("message.djtctc");
          break;
        case "jiedong":
          this.ModalTitle = this.$t("message.tcjd");
          this.ModalText = this.$t("message.jdtctc");
          break;
        case "zuofei":
          this.ModalTitle = this.$t("message.tczf");
          this.ModalText = this.$t("message.zftctc");
          break;
        case "tiaozheng":
          this.ModalTitle = this.$t("message.tctz");
          break;
        default:
          break;
      }
      if (this.saleRecordTotal === 0) {
        return false;
      }
      if (selectSalesList.length === 0 && type !== "dongjie") {
        this.isAllType = 2;
        // return this.$message.warning(`请先选择要${this.ModalTitle.slice(2)}的套餐`)
      } else {
        this.isAllType = 1;
      }
      if (this.ModalTitle === this.$t("message.tctz")) {
        this.isShowAdjust = true;
      } else {
        this.isShowModal = true;
      }
    },
    // 确定 冻结 解冻 作废
    handleModelEnter() {
      switch (this.ModalTitle) {
        case this.$t("message.tcdj"):
          this.Freeze();
          break;
        case this.$t("message.tcjd"):
          this.Unfreeze();
          break;
        case this.$t("message.tczf"):
          this.cancellation();
          break;
        case this.$t("message.tctz"):
          if (this.isAllType === "1" || this.isAllType === 1) {
            this.handleAdjust();
          } else {
            this.allHandleAdjust();
          }
          break;
        default:
          break;
      }
    },
    // 冻结
    Freeze() {
      const that = this;
      const data = {
        type: "1",
        handleRemake: this.ModelRemark,
        isCreateOrder: "1",
        autoFreezeDate: this.ModelTime,
        id: this.serviceChargeId,
      };
      this.subLoading = true;
      handleComboSalesPost({ param: { ...data } })
        .then((res) => {
          this.subLoading = false;
          this.isShowModal = false;
          if (res.errorCode === "000000") {
            const obj = res.record;
            if (obj && obj.price) {
              obj.goodsInfos = obj.serviceChargeOrderInfo;
              obj.allPrice = obj.price;
              this.$refs.child.continuePay(obj, "handlingFees");
            } else {
              this.$message.success(this.$t("message.djcg"));
              this.getList();
              // if (this.rowInfo.orderId) {
              //   this.printOrder(this.rowInfo.orderId)
              // }
            }
            //
          } else if (res.errorCode === "200001") {
            this.$confirm(
              this.$t("message.czwclddsftz"),
              this.$t("message.ts"),
              {
                confirmButtonText: this.$t("message.qd"),
                cancelButtonText: this.$t("message.qx"),
                type: "warning",
                callback: () => {},
                beforeClose: (action, ctx, close) => {
                  if (action !== "confirm") {
                    close();
                    return;
                  }
                  ctx.confirmButtonLoading = true;
                  that.$router.push({ name: "HandlingFees" });
                },
              }
            ).finally(() => {
              this.subLoading = false;
              this.isShowModal = false;
            });
          }
        })
        .catch(() => {
          this.subLoading = false;
          this.isShowModal = false;
        });
    },
    printOrder(orderId) {
      this.isPrint = true;
      if (window.Android) {
        Android.print("SERVICE_CHARGE_ORDER", orderId, "");
        return;
      }
      printOrder({
        param: {
          contentMap: {},
          venueId: sessionStorage.getItem("venueId"),
          workId: orderId,
          templateCode: "SERVICE_CHARGE_ORDER",
        },
      })
        .then((res) => {
          if (
            res.record &&
            res.record.isPrint === "1" &&
            res.record.dataList &&
            res.record.dataList.length > 0
          ) {
            res.record.dataList.forEach((item) => {
              this.$refs.RechargeTemRef.obj = { ...item };
              this.$refs.RechargeTemRef.desc = this.$t(
                "message.rechargeTemPlace"
              );
              setTimeout(() => {
                this.$refs.RechargeTemRef.print();
              }, 300);
              setTimeout(() => {
                this.isPrint = false;
                this.getList();
              }, 1000);
            });
          } else {
            this.isPrint = false;
            this.getList();
          }
        })
        .catch(() => {
          this.isPrint = false;
          this.getList();
        });
    },
    // 解冻
    async Unfreeze() {
      const data = {
        type: "2",
        handleRemake: this.ModelRemark,
        autoFreezeDate: this.ModelTime,
        id: this.selectSalesList.map((i) => i.id).join(","),
      };
      this.subLoading = true;
      const res = await handleComboSalesPost({ param: { ...data } }).catch(
        () => {
          this.subLoading = false;
          this.isShowModal = false;
        }
      );
      this.subLoading = false;
      this.isShowModal = false;
      if (res && res.errorCode === "000000") {
        this.$message.success(this.$t("message.jccg"));
        this.getList();
      }
    },
    // 调整
    async handleAdjust() {
      console.log(this.adjustData, "=============555");
      if (
        !this.adjustData.addTime &&
        (this.adjustData.zdDay == null || this.adjustData.zdDay == "")
      ) {
        return this.$message.warning(this.$t("message.qsrytzdyxqtshyl"));
      }
      const data = {
        type: "3",
        handleRemake: this.ModelRemark,
        addNum: this.adjustData.addNum || 0,
        addTime: this.adjustData.addTime || 0,
        dayTye: this.adjustData.dayTye,
        zdDay: this.adjustData.zdDay,
        id: this.selectSalesList.map((i) => i.id).join(","),
      };

      this.subLoading = true;
      const res = await handleComboSalesPost({ param: { ...data } }).catch(
        () => {
          this.subLoading = false;
          this.isShowModal = false;
        }
      );
      this.subLoading = false;
      this.isShowModal = false;
      if (res && res.errorCode === "000000") {
        this.$message.success(this.$t("message.tctzcg"));
        this.getList();
        this.isShowAdjust = false;
      }
    },
    async allHandleAdjust() {
      if (!this.adjustData.addNum && !this.adjustData.addTime) {
        return this.$message.warning(this.$t("message.qsrytzdyxqtshyl"));
      }
      const data = {
        handleRemake: this.ModelRemark,
        addNum: this.adjustData.addNum || 0,
        addTime: this.adjustData.addTime || 0,
        dayTye: this.adjustData.dayTye,
        zdDay: this.adjustData.zdDay,
      };

      this.subLoading = true;
      const res = await handleComboAllAdjust({
        param: { ...data, ...this.querys },
      }).catch(() => {
        this.subLoading = false;
        this.isShowModal = false;
      });
      this.subLoading = false;
      this.isShowModal = false;
      if (res && res.errorCode === "000000") {
        this.$message.success(this.$t("message.tctzcg"));
        this.getList();
        this.isShowAdjust = false;
      }
    },
    // 作废
    async cancellation() {
      const data = {
        type: "4",
        handleRemake: this.ModelRemark,
        id: this.selectSalesList.map((i) => i.id).join(","),
      };
      this.subLoading = true;
      const res = await handleComboSalesPost({ param: { ...data } }).catch(
        () => {
          this.subLoading = false;
          this.isShowModal = false;
        }
      );
      this.subLoading = false;
      this.isShowModal = false;
      if (res && res.errorCode === "000000") {
        this.$message.success(this.$t("message.zfcg2"));
        this.getList();
      }
    },
    handleSelectionChange(val) {
      this.selectSalesList = val;
    },
    comboDetail(item) {
      this.isShowDetail = true;
      this.$nextTick(() => {
        this.$refs.detailRef.isShowModal = true;
        this.$refs.detailRef.comboDetail(item);
      });

      // this.$router.push({
      //   name: 'comboDetail',
      //   query: item
      // })
    },
    pageSizeChange(val) {
      this.pagination.rows = val;
      this.getList(1);
    },
  },
};
</script>

<style lang="scss" scoped>
.adjust_modal {
  .df_ac {
    .key {
      width: 100px;
      // text-align: right;
    }
  }
}
</style>
